package com.youzan.open.sdk.gen.v1_0_0.model;

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.youzan.open.sdk.model.APIParams;
import com.youzan.open.sdk.model.ByteWrapper;
import com.youzan.open.sdk.model.FileParams;
import java.util.List;
import java.util.Map;
import java.util.Date;

public class YouzanClientAutosaveParams implements APIParams, FileParams  {

    /**
     * 应用状态(用于oauth授权匹配)
     */
    private Long state;
    /**
     * 备注
     */
    private String remark;
    /**
     * oauth重定向url
     */
    private String redirectUrl;
    /**
     * 三方开发者id
     */
    private Long developerId;
    /**
     * 应用名称
     */
    private String clientName;
    /**
     * 应用范围
1. 平台型
2. 工具型
3. 自用型
     */
    private Long classify;
    /**
     * 应用类型
     */
    private Long appType;
    /**
     * 应用id
     */
    private Long appId;

    public void setState(Long state) {
        this.state = state;
    }

    public Long getState() {
        return this.state;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl;
    }

    public String getRedirectUrl() {
        return this.redirectUrl;
    }

    public void setDeveloperId(Long developerId) {
        this.developerId = developerId;
    }

    public Long getDeveloperId() {
        return this.developerId;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getClientName() {
        return this.clientName;
    }

    public void setClassify(Long classify) {
        this.classify = classify;
    }

    public Long getClassify() {
        return this.classify;
    }

    public void setAppType(Long appType) {
        this.appType = appType;
    }

    public Long getAppType() {
        return this.appType;
    }

    public void setAppId(Long appId) {
        this.appId = appId;
    }

    public Long getAppId() {
        return this.appId;
    }


    public Map<String, Object> toParams() {
        Map<String, Object> params = Maps.newHashMap();
        if (state != null) {
            params.put("state", state);
        }
        if (remark != null) {
            params.put("remark", remark);
        }
        if (redirectUrl != null) {
            params.put("redirect_url", redirectUrl);
        }
        if (developerId != null) {
            params.put("developer_id", developerId);
        }
        if (clientName != null) {
            params.put("client_name", clientName);
        }
        if (classify != null) {
            params.put("classify", classify);
        }
        if (appType != null) {
            params.put("app_type", appType);
        }
        if (appId != null) {
            params.put("app_id", appId);
        }
        return params;
    }

    public Multimap<String, ByteWrapper> toFileParams() {
        Multimap<String, ByteWrapper> params = ArrayListMultimap.create();

            return params;
    }


}